<?php
if(fs_get_value('tid')!='')
{
    $sql ="select * from ".DBPREFIX."tiku where t_id=".fs_get_value('tid');
    $query  = $db->query($sql);
    $result = $db->fetch_array($query);
}
?>
<div class="main_box">
        <div class="add_question_box">
            <div class="submenu_t">
                    <ul>
                        <li><a href="?do=tikulist">试题库列表</a> | </li>
                      <?php  if(fs_get_value('tid')!=''){?><li><a href="?do=add_q"><font color="#666">编辑试题库</font></a> | </li>
                      <?php
                      }
                      else{
                      ?>
                      <li><a href="?do=add_q"><font color="#666">添加试题库</font></a> | </li>
                      <?php 
                      }?>
                    </ul>
            </div>
                <form action="?do=addtiku" method="post" onsubmit="checkbox(new array(new array('questionDbName','试题库名称不能空!')))">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="question_list_db">
                                <tbody>
                                        <tr><td width="20%" align="right">试题库名称:</td><td class="tdleft"><input type="text" id="questionDbName" size="30" name="question_db_name" value="<?php if($result['t_name']!='') echo $result['t_name'];?>"/></td><td>&nbsp;</td></tr>
                                        <tr><td align="right">试题库标签:</td><td class="tdleft"><input type="text" size="40" name="dbtag" value="<?php if($result['t_tag']!='') echo $result['t_tag'];?>" /></td><td>如果是多个标签,请使用英文状态下的逗号(,)分开</td></tr>
                                        <tr><td colspan="3" align="center"><input type="hidden" name="tid" value="<?php echo fs_get_value('tid')?>"/><input type="submit" name="submit" value="创建" class="button"/></td><td>&nbsp;</td></tr>
                                </tbody>
                        </table>
                </form>
        </div>
</div>